//
//  ClaimPerInfoTableViewCellTableViewCell.m
//  MemberProject
//
//  Created by mac on 15/7/20.
//  Copyright (c) 2015年 MAC OS X. All rights reserved.
//

#import "ClaimPerInfoTableViewCellTableViewCell.h"
#import "ClaimPicCollectionViewCell.h"
@implementation ClaimPerInfoTableViewCellTableViewCell

- (void)awakeFromNib {
    // Initialization code
    self.collectionView.backgroundColor=[UIColor clearColor];
    self.collectionView.delegate=self;
    self.collectionView.dataSource=self;
    [self.collectionView registerNib:[UINib nibWithNibName:@"ClaimPicCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"CellIdentifier"];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(claimPerInfoUpdateWithNotification:) name:@"ClaimPerInfoUpdate" object:nil];
}

-(void)claimPerInfoUpdateWithNotification:(NSNotification *)sender{
    [self.collectionView reloadData];
}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    return self.data.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *CellIdentifier=@"CellIdentifier";
    ClaimPicCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
    cell.imageView.image=self.data[indexPath.row];
    return cell;
}
@end
